package com.itlong.cloud.sdk.resource;

import com.itlong.cloud.POJO.DTO.sdk.CloudTalkDeviceGetPageDTO;
import com.itlong.cloud.POJO.VO.sdk.CloudTalkDeviceListPageVO;
import com.itlong.cloud.equip.sdk.ICloudTalkSDKServiceClient;
import com.itlong.cloud.sdk.service.ICloudTalkSDKDeviceInfoService;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <desc>
 *      云对讲SDK服务暴露接口实现类。
 * <desc/>
 *
 * @createDate 2018-05-17.
 */
@RestController
public class CloudTalkSDKServiceResource implements ICloudTalkSDKServiceClient {

    @Autowired
    ICloudTalkSDKDeviceInfoService iCloudTalkSDKDeviceInfoService;
    /**
     * <desc>
     *      获取项目云对讲设备列表。
     * <desc/>
     *
     * @param  pageDTO
     * @return
     * @author shengen.T
     * @createDate 2018-05-17
     */
    @Override
    @RequestMapping(path = "/cloud/intercom/server/getDeviceList",method = RequestMethod.POST)
    public Page<CloudTalkDeviceListPageVO> getCloudTalkDeviceList(@RequestBody CloudTalkDeviceGetPageDTO pageDTO) throws Exception{
        return iCloudTalkSDKDeviceInfoService.getCloudTalkDeviceList(pageDTO);
    }
}
